var ajaxUrl = require('../../../utils/url.js');
var encrypt = require('../../../utils/encrypt.js');
let app = getApp()
Page({
  data: {
    list: []
  },
  onShow () {
    const self = this
    self.fetchData()
  },
  fetchData() {
    const self = this
    let params = {
      token: app.globalData.token
    }
    wx.request({
      method: "POST",
      url: ajaxUrl.orderList(),
      data: params,
      success: function(res){
        if(res.data.code === 200){
          self.setData({
            list: res.data.data,
          })
        }else{
          console.error(res.data.msg)
        }
      }
    })
  }
})